package com.hfxt.service;

import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@Service
public class TaskService {

    //ribbon+restTemplate

    @Resource
    RestTemplate restTemplate;

    public String getService(String name){
        return restTemplate.getForObject("http://DEMO-PROVIDER/hello?username="+name,String.class);
    }
}
